import { data } from "react-router-dom";
import { common_utils } from "../utils/utils";

export var productService = {
  getProducts: function(categoryId,ok) {
    common_utils.request({
      url: "categories/" + categoryId + "/products",
      method: "GET",
      success: ok,
      data: null
    });
  },
  getSearchProduct:function(searchText,ok){
    common_utils.request({
        url: "categories/BIRDS/products/similar?keyword="+searchText,
        method: "GET",
        success: ok,
        data: null
      });
  }
};